package com.shenjianquan.cryptography.controller;

import com.shenjianquan.cryptography.pojo.Data;
import com.shenjianquan.cryptography.pojo.Result;
import com.shenjianquan.cryptography.pojo.VideoInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class ResultController {

    @GetMapping("/ss")
    @ResponseBody
    public Result getResult(){
        Result result = new Result();
        Data data = new Data();
        VideoInfo videoInfo = new VideoInfo();
        videoInfo.setAuthor("牧草君");
        videoInfo.setDate("12-15");
        videoInfo.setVideoSrc("https://shenjianquan-gulimall.oss-cn-guangzhou.aliyuncs.com/1.mp4");
        videoInfo.setPlayCount("24.9万");
        videoInfo.setVideoTitle("世界上广告最多的网站判定！真的有10000条广告！【暗物质#2】");
        videoInfo.setCommentCount("1111");
        data.setVideoInfo(videoInfo);
        result.setData(data);
        result.setCode(0);

        return result;
    }
}
